Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add fh streaming possibility #77

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

julianhille
Copy link
Contributor

@julianhille julianhille commented Sep 22, 2024

Adding io input back in.

No idea if that is of any help for anyone else, but at least i need to be able to stream a pyfilelike object.

Feel free to roast all of it as this is my first contact with rust and rust as python module. :>

Fixes #36

@woodruffw
Copy link
Owner

Thanks @julianhille, I'll try and give this a review today or tomorrow.

@woodruffw woodruffw added the enhancement New feature or request label Sep 23, 2024
@woodruffw
Copy link
Owner

Looks like the lint is failing; mind running cargo fmt locally?

Copy link
Owner

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, a few small style nits (plus the lint failures in CI)!

@julianhille
Copy link
Contributor Author

Looks like the lint is failing; mind running cargo fmt locally?

Just learned about rustfmt and Cargo fmt yesterday. Committed your suggestions, will rebase / Squash format and then get back to you.

If thats OK with you to rebase in the middle of a review.

@julianhille julianhille force-pushed the feature/re-add-fh-support branch from 8e50e49 to 28c7011 Compare September 23, 2024 23:46
Co-authored-by: William Woodruff <[email protected]>
@julianhille julianhille force-pushed the feature/re-add-fh-support branch from 28c7011 to 631e712 Compare September 23, 2024 23:47
@julianhille
Copy link
Contributor Author

Fixed and rebased. Let me know if there is anything else I can do.

@woodruffw
Copy link
Owner

Some more lint failures:

error: unused variable: `py`
   --> src/lib.rs:263:18
    |
263 | fn from_pyobject(py: Python, file: PyObject, read_only: bool) -> PyResult<PyFileLikeObject> {
    |                  ^^ help: if this is intentional, prefix it with an underscore: `_py`
    |
    = note: `-D unused-variables` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_variables)]`

error: unneeded `return` statement
   --> src/lib.rs:265:5
    |
265 |     return PyFileLikeObject::with_requirements(file, read_only, !read_only, false, false);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `-D clippy::needless-return` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
    |
265 -     return PyFileLikeObject::with_requirements(file, read_only, !read_only, false, false);
265 +     PyFileLikeObject::with_requirements(file, read_only, !read_only, false, false)
    |

error: could not compile `pyrage` (lib) due to 2 previous errors
Error: Process completed with exit code 101.

cargo clippy --fix should fix those.

Also, don't worry about rebasing/squashing -- it's fine to just push, and I'll handle the squash while merging 🙂

@julianhille
Copy link
Contributor Author

Ah thanks overlooked that. Will get to it.

@julianhille
Copy link
Contributor Author

tried again. should work now :> thanks for your patience

@julianhille
Copy link
Contributor Author

Would you mind start the ci run again? Thanks

Copy link
Owner

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @julianhille, looks good to me!

@woodruffw woodruffw merged commit dc191c2 into woodruffw:main Sep 26, 2024
17 checks passed
@woodruffw
Copy link
Owner

Let me know if you'd like a release for this. Otherwise, I'll likely do it the next time another feature PR comes in.

@julianhille julianhille deleted the feature/re-add-fh-support branch September 26, 2024 23:05
@julianhille
Copy link
Contributor Author

I'd Love a Release. If Not to much effort.

@woodruffw
Copy link
Owner

Released with v1.2.0. Thanks for your hard work here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streaming decryption
2 participants